package com.dkm.orproject.dkmoa.service;

import com.dkm.orproject.dkmoa.domain.OaPersonnel;
import com.dkm.orproject.dkmoa.domain.OaTravelBusinessFlow;

import java.util.List;

/**
 *  @ClassName : OaTravelBusinessFlowService  //类名
 *  @Description :  OaTravelBusinessFlow的service层 差旅详情服务层//描述
 *  @Author : zmh //作者
 *  @Date: 2021`-1-20 09:28  //时间
 */
public interface OaTravelBusinessFlowService {

    /**
     * 插入差旅详情
     * @param oaTravelBusinessFlow 差旅详情对象
     * @return 回调函数
     */
    int insertTravelBusinessFlow(OaTravelBusinessFlow oaTravelBusinessFlow);

    /**
     * 根据 Id 删除差旅详情对象
     * @param pkTravelBusinessId 差旅详情的id值
     * @return 删除的条数
     */
    int deleteTravelBusinessFlowByPrimaryKey(Long pkTravelBusinessId);

    /**
     * 修改差旅详情
     * @param oaTravelBusinessFlow 差旅详情对象
     * @return 回调函数
     */
    int updateTravelBusinessFlowByPrimaryKey(OaTravelBusinessFlow oaTravelBusinessFlow);

    /**
     * 根据id查询差旅详情
     * @param pkTravelBusinessId  差旅详情的id值
     * @return 差旅详情对象
     */
    OaTravelBusinessFlow selectTravelBusinessFlowByPrimaryKey(Long pkTravelBusinessId);

    /**
     *增加差旅流程
     * @param oaTravelBusinessFlow 差旅流程模型对象
     * @param oaPersonnel  申请人
     * @return
     */
    int add(OaTravelBusinessFlow oaTravelBusinessFlow, OaPersonnel oaPersonnel);

    /**
     *所在部通过
     * @param oaPersonnel
     * @param pkOaTravelBusinessId
     * @return
     */
    int sectionPass(OaPersonnel oaPersonnel,Long pkOaTravelBusinessId);

    /**
     *所在部未通过
     * @param pkTravelBusinessId
     * @param oaPersonnel
     * @param formReason
     * @return
     */
    int sectionNoPass(Long pkTravelBusinessId,OaPersonnel oaPersonnel,String formReason);

    /**
     *行政领导审核(通过)
     * @param pkTravelBusinessId 差旅流程id
     * @param oaPersonnel 操作人
     * @return 回调函数
     */
    int staffingPass(Long pkTravelBusinessId,OaPersonnel oaPersonnel);

    /**
     * 行政领导审核(未通过)
     * @param pkTravelBusinessId 差旅流程id
     * @param oaPersonnel 操作人
     * @param formReason 原因
     * @return
     */
    int staffingNoPass(Long pkTravelBusinessId,OaPersonnel oaPersonnel,String formReason);

    /**
     *批量删除差旅流程
     * @param ids
     * @return
     */
    int deleteAll(List<Long> ids);

    /**
     * 分页查询差旅流程
     *
     * @param oaTravelBusinessFlow
     * @param page
     * @param limit
     * @param startDate
     * @param endDate
     * @return
     */
    List<OaTravelBusinessFlow> findAll(OaTravelBusinessFlow oaTravelBusinessFlow, Integer page, Integer limit, String startDate, String endDate);

    /**
     * 总行数
     *
     * @param oaTravelBusinessFlow
     * @param startDate
     * @param endDate
     * @return
     */
    Long rowCount(OaTravelBusinessFlow oaTravelBusinessFlow, String startDate, String endDate);

    /**
     * 总经理通过审核
     * @param pkOaTravelBusinessId
     * @param oaPersonnel
     * @return
     */
    int exPass(Long pkOaTravelBusinessId, OaPersonnel oaPersonnel);

    /**
     * 总经理未通过审核
     * @param pkOaTravelBusinessId
     * @param managerOpinion
     * @param oaPersonnel
     * @return
     */
    int exNoPass(Long pkOaTravelBusinessId, String managerOpinion, OaPersonnel oaPersonnel);

    List<OaTravelBusinessFlow> selectAll(List<Long> list);
}
